package com.mjk.common.ai.work.chat;


import com.mjk.common.ai.base.ThreadContext;
import com.mjk.common.ai.dto.ConvPresetRelDto;
import com.mjk.common.ai.service.ConversationPresetRelService;
import jakarta.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RequestMapping("/conversation-preset-rel")
@RestController
public class ConversationPresetRelController {

    @Resource
    private ConversationPresetRelService conversationPresetRelService;


    @GetMapping("/mine")
    public List<ConvPresetRelDto> mine(@RequestParam(defaultValue = "100") Integer limit) {
        return conversationPresetRelService.listByUser(ThreadContext.getCurrentUserId(), limit);
    }
}
